import request from '@/utils/request'

// 查询木业仓库信息列表
export function listWarehouseList(query) {
  return request({
    url: '/warehouse/warehouseList/list',
    method: 'get',
    params: query
  })
}

// 查询木业仓库信息详细
export function getWarehouseList(warehouseId) {
  return request({
    url: '/warehouse/warehouseList/' + warehouseId,
    method: 'get'
  })
}

// 新增木业仓库信息
export function addWarehouseList(data) {
  return request({
    url: '/warehouse/warehouseList',
    method: 'post',
    data: data
  })
}

// 修改木业仓库信息
export function updateWarehouseList(data) {
  return request({
    url: '/warehouse/warehouseList',
    method: 'put',
    data: data
  })
}
// 修改仓库数据状态
export function editWarehouseStatus(warehouseId,status) {
  const data = {
    warehouseId,
    status
  }
  return request({
    url: '/warehouse/warehouseList/editState',
    method: 'put',
    data: data
  })
}
// 删除木业仓库信息
export function delWarehouseList(warehouseId) {
  return request({
    url: '/warehouse/warehouseList/' + warehouseId,
    method: 'delete'
  })
}

// 导出木业仓库信息
export function exportWarehouseList(query) {
  return request({
    url: '/warehouse/warehouseList/export',
    method: 'get',
    params: query
  })
}
